using UnityEditor;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.AI
{
    [CustomEditor(typeof(LibertyAIManager))]
    public class LibertyAIManagerEditor : UnityEditor.Editor
    {
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            if (GUILayout.Button("添加Npc"))
            {
                LibertyAIManager aiManager = target as LibertyAIManager;
                aiManager.AddNpc(aiManager.debugBirthData, aiManager.debugGraphId);
            }

            if (GUILayout.Button("在点位置生成Npc"))
            {
                LibertyAIManager aiManager = target as LibertyAIManager;
                aiManager.debugBirthData.position = aiManager.debugTransform.position;
                aiManager.debugBirthData.forward = aiManager.debugTransform.forward;
                aiManager.AddNpc(aiManager.debugBirthData, aiManager.debugGraphId);
                aiManager.debugBirthData.position = Vector3.zero;
                aiManager.debugBirthData.forward = Vector3.forward;
            }
        }
    }
}